﻿package com.victory.properties
{
	
	/**
	 * ...
	 * @author ...
	 */
	public class Attack
	{
		public var name:String; // Name of the ability
		public var description:String; // Description of the ability
		public var ap:int; // AP cost of the manuever
		public var damage:int; // damage per attack
		public var numAttacks:int; // Number of discrete attacks.
		public var damageType:String; // String: "fort", "refl", "will" or "armor", "spirit", "corp", "ele"
		public var accuracy:Number; // Chance for attack to hit.
		public var procEffect:String; // this should be a type Status Effect later on.
		public var procChance:Number; // Chance of proc taking effect. Independent of accuracy of attack
		public var speed:int; // Lower speed will act first for the initiative
		public var range:String; // Range it is usable at "near", "far", "both"
	
		public function Attack(atk:XMLList) {
			initAtk(atk);
			
		}
		
		public function initAtk(atk:XMLList):void {
			name = atk.name;
			ap = atk.ap;
			description = atk.description;
			damage = atk.damage;
			numAttacks = atk.numAttacks;
			accuracy = atk.accuracy;
			damageType = atk.damageType;
			procEffect = atk.procEffect;
			procChance = atk.procChance;
			speed = atk.speed;
			range = atk.range;
		}
	}
	
}